/*
 * All rights Reserved, Designed By DataDriver
 * Copyright:    DataDriver.Inc
 * Company:      Zhuo Wo Infomation Technology (ShangHai) CO.LTD
 */
package com.sun.dubboconsumer.controller;

import com.sun.model.UserInfo;
import com.sun.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class ConsumerController {

    @Autowired
    private ConsumerService consumerService;

    /**
     * 查询所有用户信息
     * @return
     */
    @RequestMapping("/find")
    public List<UserInfo> findAllUserInfo() {
        List<UserInfo> userInfoList = consumerService.findAllUserInfo();
        return userInfoList;
    }
}
